<%@page import="java.io.* , java.util.*, java.sql.*, com.myapp.struts.dao.*, com.myapp.struts.actionform.*"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<html:html lang="true">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>AccountHead View</title>
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css"> 
        <link href="css/cms.css" rel="stylesheet" type="text/css">
    </head>

    <body bgcolor="#D3F1D5">
        <table width="845" border="0" cellpadding="0" cellspacing="0"  style="border-right: #000000 1px solid;
                               border-top: #000000 1px solid; border-left: #000000 1px solid;  border-bottom: #000000 1px solid; font-size: 9pt; color: #000000; font-family: Arial;">

<tr>
                <td width="878" rowspan="12">


                    <table width="844" border="0" align="center" cellpadding="0" cellspacing="0" style="border-right: #000000 1px solid;
                           border-top: #000000 1px solid; border-left: #000000 1px solid;  border-bottom: #000000 1px solid; font-size: 9pt; color: #000000; font-family: Arial;">
<tr>
                            <tH height="29" colspan="7" align="center"> List Of Account Heads</tH>
                        </tr>
                        <tr>
                            <th width="3%" height="29" align="center">NO</th>
                          <th width="15%" align="center">ACCOUNT NAME</th>
                          <th width="16%" align="center">ACCOUNT CATAGORY</th>
                          <th width="8%" align="center">AMOUNT</th>
                          <th width="12%" align="center">ACCOUNT TYPE</th>
                          <th width="15%" height="29" align="center">SCHEDULE</th>
                          <th width="31%" height="29" align="center">DESCRIPTION</th>
                      </tr>
                        <%
                                    AcheadDao shd = new AcheadDao();

                                    ArrayList al = shd.list();
                                    if (al != null) {
                                        Iterator itg = al.iterator();
                                        while (itg.hasNext() == true) {
                                            AccountHeadFormBean shb = (AccountHeadFormBean) itg.next();
                                            String Acc_no = shb.getAccountHeadNumber();
                                            String Acc_Name = shb.getAccountHeadName();
                                            String Acc_Cat = shb.getAccountHeadType();
                                            double Obalance = shb.getOpeningBalance();
                                            String Balance_type = shb.getBalanceType();
                                            String Schedule = shb.getSchedule();
                                            String Description = shb.getDescription();
                        %>
                        <tr>
                            <td height="29" align="center"><strong><%=Acc_no%></strong></td>
                            <td><strong><%=Acc_Name%></strong></td>
                            <td><strong><%=Acc_Cat%></strong></td>
                            <td align="right"><strong><%=Obalance%></strong></td>
                          <td align="center"><strong><%=Balance_type%></strong></td>
                          <td height="29"><strong><%=Schedule%></strong></td>
                            <td height="29"><strong><%=Description%></strong></td>
                        </tr>
                        <%}
            }%>
                    </table>


      </td>
            </tr>
        </table>
    </body>
</html:html>
